﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using predic.Web.Host.Model;

namespace predic.Web.Controls
{
    public partial class MaintainPrediciControl : UserControl
    {
        public MaintainPrediciControl()
        {
            InitializeComponent();
            this.DataContext = new Model.MaintainPredici();

            this.Loaded += new RoutedEventHandler(MaintainPrediciControl_Loaded);
        }

        void MaintainPrediciControl_Loaded(object sender, RoutedEventArgs e)
        {
            //Grid a = new Grid();
            //a.MouseLeftButtonDown
            
        }



        private void GridStudy_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //StudyDetailView studyDetail = new StudyDetailView();
            //studyDetail.Show();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Model.StudyDetail studyModel = new Model.StudyDetail((Study)GridStudy.SelectedItem);
            StudyDetailView studyDetail = new StudyDetailView();
            
            studyDetail.DataContext = studyModel;
            studyDetail.Show();
        }
    }
}
